<template>
	<view>
		<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18">
			<view
				class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30">
				<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold coreshop-flex coreshop-align-center">
					<view class="dot dot__red c-m-r-10"></view>
					<text>热销推荐</text>
				</view>
				<u-icon name="arrow-right-double" size="12" label="更多" labelSize="12" labelPos="left" @click="$u.route('/pages/project/reservationList')" />
			</view>
			<view class="c-m-t-10">
				<u-list :height="'820rpx'">
					<u-list-item 
						v-for="(item, key) in coreshopData.parameters.list" 
						:key="key">
						<view
							class="coreshop-flex coreshop-align-center c-m-b-10 c-p-t-10 radius coreshop-solid-top::after" 
							@click="$u.route('/pages/project/reservationDetails',{id: item.id})"
						>
							<view class="flex-shink">
								<u-avatar :src="item.image || '/static/images/logo/logo.png'" shape="square" size="77" />
							</view>
							<view class="c-m-l-10 coreshop-percent-100">
								<view>
									<view class="coreshop-text-bold coreshop-text-block">{{item.name}}</view>
									<view class="">
										<text class="line-gray coreshop-font-12">已预约{{item.subscribeCount}}</text>
									</view>
								</view>
								<view class="coreshop-flex coreshop-align-end coreshop-justify-between">
									<view>
										<text class="line-red coreshop-font-12">￥</text>
										<text class="line-red">{{item.price}}</text>
									</view>
									<view class="flex-shink" @click.stop="$u.route('/pages/reservation/seReservation', {projectId: item.id, type:'purchase'})">
										<u-button color="#ED174D" text="立即预约" shape="circle"></u-button>
									</view>
								</view>
							</view>
						</view>
					</u-list-item>
				</u-list>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: { coreshopData: { required: true, } },
		data() {
			return {}
		},
		created() {
			console.log('sdas', this.coreshopData)
		}
	}
</script>

<style lang="scss" scoped>
</style>
